package com.example.javascaffold.utils;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


/**
 * 返回结果 通用版
 * @author song
 * @date 8:08 2022/2/19
 * @param 
 * @return 
 * @other
**/
@ApiModel(value = "返回结果 通用版")
@Data
public class RetData<T> {

    @ApiModelProperty(value = "返回数据", example = "any")
    private T result;

    /**
     * 静态方法 设置result值
     * @author song
     * @date 8:08 2022/2/19
     * @param
     * @return
     * @other
     **/
    public static <T> RetData<T> result(T result) {
        RetData<T> ret = new RetData<>();
        ret.setResult(result);
        return ret;
    }
}
